# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=kholidays
pkgver=6.1.0
pkgrel=0
pkgdesc="Support for icon themes"
arch="all !armhf" # armhf blocked by qt6-qtdeclarative
url="https://community.kde.org/Frameworks"
license="LGPL-2.0-or-later"
depends_dev="
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/kholidays.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kholidays-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
d2f3f5c3039f2ee55292edc427da863b0dfb364c57f74aeebcb6c8a85664c58aedbc810f1daec08e905decc3037d373607b0cc40929347030c2d2fef504663ff  kholidays-6.1.0.tar.xz
"
